package com.visizen.wisdomclass.server.client;

import com.visizen.wisdomclass.server.model.WcInform;
import com.visizen.wisdomclass.server.model.WcInformExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface WcInformMapper {
    @SelectProvider(type=WcInformSqlProvider.class, method="countByExample")
    int countByExample(WcInformExample example);

    @DeleteProvider(type=WcInformSqlProvider.class, method="deleteByExample")
    int deleteByExample(WcInformExample example);

    @Delete({
        "delete from wc_inform",
        "where ID = #{ID,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long ID);

    @Insert({
        "insert into wc_inform (ID, TYPE, ",
        "TITLE, INFORM_TIME, ",
        "INFORMATION, SPONSER, ",
        "TO_FAMLIY, TO_TEACHER, ",
        "TO_STUDENT, ROUND, ",
        "ROUND_ID, FEEDBACK)",
        "values (#{ID,jdbcType=BIGINT}, #{TYPE,jdbcType=INTEGER}, ",
        "#{TITLE,jdbcType=VARCHAR}, #{INFORM_TIME,jdbcType=TIMESTAMP}, ",
        "#{INFORMATION,jdbcType=VARCHAR}, #{SPONSER,jdbcType=BIGINT}, ",
        "#{TO_FAMLIY,jdbcType=INTEGER}, #{TO_TEACHER,jdbcType=INTEGER}, ",
        "#{TO_STUDENT,jdbcType=INTEGER}, #{ROUND,jdbcType=VARCHAR}, ",
        "#{ROUND_ID,jdbcType=VARCHAR}, #{FEEDBACK,jdbcType=INTEGER})"
    })
    int insert(WcInform record);

    @InsertProvider(type=WcInformSqlProvider.class, method="insertSelective")
    int insertSelective(WcInform record);

    @SelectProvider(type=WcInformSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="ID", property="ID", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="TYPE", property="TYPE", jdbcType=JdbcType.INTEGER),
        @Result(column="TITLE", property="TITLE", jdbcType=JdbcType.VARCHAR),
        @Result(column="INFORM_TIME", property="INFORM_TIME", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="INFORMATION", property="INFORMATION", jdbcType=JdbcType.VARCHAR),
        @Result(column="SPONSER", property="SPONSER", jdbcType=JdbcType.BIGINT),
        @Result(column="TO_FAMLIY", property="TO_FAMLIY", jdbcType=JdbcType.INTEGER),
        @Result(column="TO_TEACHER", property="TO_TEACHER", jdbcType=JdbcType.INTEGER),
        @Result(column="TO_STUDENT", property="TO_STUDENT", jdbcType=JdbcType.INTEGER),
        @Result(column="ROUND", property="ROUND", jdbcType=JdbcType.VARCHAR),
        @Result(column="ROUND_ID", property="ROUND_ID", jdbcType=JdbcType.VARCHAR),
        @Result(column="FEEDBACK", property="FEEDBACK", jdbcType=JdbcType.INTEGER)
    })
    List<WcInform> selectByExample(WcInformExample example);

    @Select({
        "select",
        "ID, TYPE, TITLE, INFORM_TIME, INFORMATION, SPONSER, TO_FAMLIY, TO_TEACHER, TO_STUDENT, ",
        "ROUND, ROUND_ID, FEEDBACK",
        "from wc_inform",
        "where ID = #{ID,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="ID", property="ID", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="TYPE", property="TYPE", jdbcType=JdbcType.INTEGER),
        @Result(column="TITLE", property="TITLE", jdbcType=JdbcType.VARCHAR),
        @Result(column="INFORM_TIME", property="INFORM_TIME", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="INFORMATION", property="INFORMATION", jdbcType=JdbcType.VARCHAR),
        @Result(column="SPONSER", property="SPONSER", jdbcType=JdbcType.BIGINT),
        @Result(column="TO_FAMLIY", property="TO_FAMLIY", jdbcType=JdbcType.INTEGER),
        @Result(column="TO_TEACHER", property="TO_TEACHER", jdbcType=JdbcType.INTEGER),
        @Result(column="TO_STUDENT", property="TO_STUDENT", jdbcType=JdbcType.INTEGER),
        @Result(column="ROUND", property="ROUND", jdbcType=JdbcType.VARCHAR),
        @Result(column="ROUND_ID", property="ROUND_ID", jdbcType=JdbcType.VARCHAR),
        @Result(column="FEEDBACK", property="FEEDBACK", jdbcType=JdbcType.INTEGER)
    })
    WcInform selectByPrimaryKey(Long ID);

    @UpdateProvider(type=WcInformSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") WcInform record, @Param("example") WcInformExample example);

    @UpdateProvider(type=WcInformSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") WcInform record, @Param("example") WcInformExample example);

    @UpdateProvider(type=WcInformSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(WcInform record);

    @Update({
        "update wc_inform",
        "set TYPE = #{TYPE,jdbcType=INTEGER},",
          "TITLE = #{TITLE,jdbcType=VARCHAR},",
          "INFORM_TIME = #{INFORM_TIME,jdbcType=TIMESTAMP},",
          "INFORMATION = #{INFORMATION,jdbcType=VARCHAR},",
          "SPONSER = #{SPONSER,jdbcType=BIGINT},",
          "TO_FAMLIY = #{TO_FAMLIY,jdbcType=INTEGER},",
          "TO_TEACHER = #{TO_TEACHER,jdbcType=INTEGER},",
          "TO_STUDENT = #{TO_STUDENT,jdbcType=INTEGER},",
          "ROUND = #{ROUND,jdbcType=VARCHAR},",
          "ROUND_ID = #{ROUND_ID,jdbcType=VARCHAR},",
          "FEEDBACK = #{FEEDBACK,jdbcType=INTEGER}",
        "where ID = #{ID,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(WcInform record);
}